import request from '@/utils/request'
import { microservices } from '@/utils'

export function getSysSystemParam (params) {
  let sortStr = params.sortStr
  delete params.sortStr
  return request({
    url: `${microservices.pmsSys}/SysSystemParam?${sortStr}`,
    params,
    method: 'get'
  })
}

export function postSysSystemParam (data) {
  return request({
    url: `${microservices.pmsSys}/SysSystemParam`,
    data,
    method: 'post'
  })
}
export function getSysSystemParamSort (params) {
  return request({
    url: `${microservices.pmsSys}/SysSystemParam?currPage=${params.currPage}&pageSize=${params.pageSize}&paramName=${params.paramName}${params.sortList}`
  })
}
export function getSysSystemParamEdit (paramCode) {
  return request({
    url: `${microservices.pmsSys}/SysSystemParam/${paramCode}`
  })
}

// 无需登录获取参数
export function getQueryParamValue (str) {
  return request({
    url: `${microservices.pmsSys}/SysSystemParam/queryParamValueByCode/${str}`,
    method: 'get'
  })
}